/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package admin.provider;

import admin.util.UtilEjb;
import ejb.attribute.KscEventJndi;
import ejb.bean.AbstractFacade;
import ejb.bean.RoleFacade;
import ejb.entity.Role;

public class RoleProvider extends WrapperProvider<Role> {

    public static RoleProvider getInstance() {
        return RoleProviderHolder.INSTANCE;
    }

    public RoleProvider() {
        super(Role.class);
    }

    @Override
    public AbstractFacade<Role> getAbstractFacade() {
        return getRoleFacade();
    }

    private RoleFacade getRoleFacade() {
        return UtilEjb.getInstance().<RoleFacade>getEJB(KscEventJndi.ROLE_BEAN);
    }

    private static class RoleProviderHolder {

        private static final RoleProvider INSTANCE = new RoleProvider();

        private RoleProviderHolder() {
        }
    }
}
